package cn.laixueit.service.impl;

import cn.laixueit.mapper.AddressMapper;
import cn.laixueit.pojo.Address;
import cn.laixueit.pojo.AddressExample;
import cn.laixueit.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {


    @Autowired
    private AddressMapper addressMapper;

    @Override
    public List<Address> findAll(Integer uid) {
        AddressExample example = new AddressExample();
        AddressExample.Criteria criteria = example.createCriteria();
        criteria.andUidEqualTo(uid);
        List<Address> addressList = addressMapper.selectByExample(example);
        return addressList;
    }
}
